import { Button } from "antd";
import React from "react";
import { useNavigate, useParams, useSearchParams } from "react-router-dom";

const Surrender: React.FC = (props) => {
  const nav = useNavigate();
  const [search] = useSearchParams();
  const contractNo = search.get('contractNo');

  function handleReturn() {
    nav('/finance/contract', {state: {enableCache: true}});
  }

  return (
    <div>
      <Button onClick={handleReturn}>返回</Button>
      <div>合同编号: {contractNo}</div>
    </div>
  );
};

export default Surrender;
